package com.wpp.controller;


import com.wpp.pojo.User;
import com.wpp.service.UserService;
import com.wpp.service.impl.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserServiceImpl userService;

    @RequestMapping("/test1")
    public String test1() {
        return "succes";
    }

    @RequestMapping("/test2")
    public String test2() {
        List<User> allService = userService.findAllService();
        System.out.println("Controller执行了==================================");

        System.out.println(allService);
        return "succes2";
    }
}
